<script setup>
import { ref } from 'vue';

const bannerList = ref([
    { imgUrl: 'header.jpg', alt: 'banner1' },
    { imgUrl: 'bg.jpg', alt: 'banner2' },
    { imgUrl: 'header.jpg', alt: 'banner3' },
    { imgUrl: 'bg.jpg', alt: 'banner4' }
]);
</script>

<template>
    <div class="banner">
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="(item,i) in bannerList" :key="i">
                <img :src="`/src/assets/images/${item.imgUrl}`" :alt="item.alt" />
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<style scoped></style>